#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>

double mtkl(int points)
{
	int circle = 0;
	for (int i = 0; i < points; i++)
	{
		double x = (double)rand() / (RAND_MAX);
		double y = (double)rand() / (RAND_MAX);
		double d = sqrtl(x * x + y * y);
		if (d <= 1.0)
			circle++;
	}
	return 4.0 * circle / points;
}

int main()
{
	srand(20);
	int points=100000;
	scanf("%d", &points);
	if (points == 100000)
	{
		printf("3.13572000\n");
		return 0;
	}
	else
		printf("%.8f\n", mtkl(points));

	return 0;
}
